<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="ECSHOP v2.7.3" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />

<title>购物流程_ECSHOP演示站 - Powered by ECShop</title>

<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="/shop/Public/style/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="./style/common.js"></script><script type="text/javascript" src="./style/shopping_flow.js"></script></head>
<body>
<link href="/shop/Public/style/qq.css" rel="stylesheet" type="text/css" />
 
<script type="text/javascript">
var process_request = "正在处理您的请求...";
</script>
<script type="text/javascript">
//设为首页 www.ecmoban.com
function SetHome(obj,url){
    try{
        obj.style.behavior='url(#default#homepage)';
       obj.setHomePage(url);
   }catch(e){
       if(window.netscape){
          try{
              netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
         }catch(e){
              alert("抱歉，此操作被浏览器拒绝！\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'");
          }
       }else{
        alert("抱歉，您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+url+"】设置为首页。");
       }
  }
}
 
//收藏本站 bbs.ecmoban.com
function AddFavorite(title, url) {
  try {
      window.external.addFavorite(url, title);
  }
catch (e) {
     try {
       window.sidebar.addPanel(title, url, "");
    }
     catch (e) {
         alert("抱歉，您所使用的浏览器无法完成此操作。\n\n加入收藏失败，请使用Ctrl+D进行添加");
     }
  }
}
</script>

 


 <div class="top_nav">
	<script type="text/javascript">
          //初始化主菜单
            function sw_nav(obj,tag)
            {
     
            var DisSub = document.getElementById("DisSub_"+obj);
            var HandleLI= document.getElementById("HandleLI_"+obj);
                if(tag==1)
                {
                    DisSub.style.display = "block";
             
                    
                }
                else
                {
                    DisSub.style.display = "none";
                
                }
     
            }
     
    </script>
    <script type="text/javascript" src="/shop/Public/style/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/shop/Public/style/jquery.jqzoom.js"></script>
<script type="text/javascript" src="/shop/Public/style/base.js"></script>
    <div class="block">     
    
        <ul class="top_bav_l">
        <li class="top_sc">
           <a href="javascript:void(0);" onclick="AddFavorite('我的网站',location.href)">收藏本站</a>
</li>
            <li>关注我们：</li>
            <li style="border:none" class="menuPopup" onmouseover="sw_nav(1,1);" onmouseout="sw_nav(1,0);">
            <a id="HandleLI_1" href="javascript:;" title="微博" class="attention"></a> 
            <div id="DisSub_1" class="top_nav_box  top_weibo"> 
            <a href="http://e.weibo.com/ECMBT" target="_blank" title="新浪微博" class="top_weibo"></a>
            <a href="http://e.t.qq.com/ecmoban_com" target="_blank" title="QQ微博" class="top_qq"></a> 
            </div> 
            </li> 
            <li class="menuPopup" onmouseover="sw_nav(2,1);" onmouseout="sw_nav(2,0);">
            <a id="HandleLI_2" href="javascript:;" title="微信" class="top_weixin"></a> 
            <div id="DisSub_2" class="weixinBox" style="display: none;"> 
		
            <img src="/shop/Public/images/weixin.png" style="width:150px; height:190px;  background:#0000CC" height="190" width="150"> 
            </div> 
            </li>
        </ul>
    
        <div class="header_r">
        
        <script type="text/javascript" src="/shop/Public/style/transport.js"></script>
		<script type="text/javascript" src="/shop/Public/style/login.js"></script>
		<script type="text/javascript" src="/shop/Public/style/utils.js"></script>
        <font id="login_chick"/>
		<?php if(is_array($navres)): $i = 0; $__LIST__ = $navres;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><a href="<?php echo ($vo["nav_url"]); ?>" <?php if($vo['nav_blank'] == 1): ?>target="_blank"<?php endif; ?>><?php if($vo['nav_pos'] == 1): echo ($vo["nav_name"]); ?><if condition="$i neq 4"><span>|</span><?php endif; ?></a><?php endforeach; endif; else: echo "" ;endif; ?>                           
        </div>
    </div>
</div>
<div class=" block header_bg" style="margin-bottom: 0px;">
  <div class="clear_f"></div>
  <div class="header_top logo_wrap"> <a class="logo_new" href="/mbmeilishuo/index.php"><img src="/shop/Public/images/logo.gif"></a>
    <div class="ser_n">
      <form id="searchForm" class="searchBox" name="searchForm"  method="get" action="search.php" onsubmit="return checkSearchForm()">
        <div class="search-table"> <span class="cur" data-type="1">宝贝</span> <em class="arrow"></em> </div>
        <span class="ipt1"><em class="i_search"></em>
        <input name="keywords" id="keyword" class="searchKey" value="111111111111111111111111111111" type="text">
        </span> <span class="ipt2">
        <input name="imageField" class="fm_hd_btm_shbx_bttn" value="搜 索" type="submit">
        </span>
      </form>
      <div class="clear_f"></div>
      <ul class="searchType none_f">
      </ul>
    </div>
    <ul class="cart_info">
      <li id="ECS_CARTINFO"><span class="carts_num none_f"><a href="/mbmeilishuo/flow.php" title="查看购物车">0</a></span> <em class="i_cart">&nbsp;</em><a href="/mbmeilishuo/flow.php">查看购物车</a></li>
      <li><a href="/mbmeilishuo/user.php" target="_blank"><em class="i_order">&nbsp;</em>我的订单</a></li>
    </ul>
  </div>
</div>
<div style="clear:both"></div>
 <div class=" block header_bg" ><span>热门搜索：</span>
		<?php $keywords=explode(',',$configres['searchkeywords']); foreach($keywords as $k=>$v): ?>
		<a href="http://localhost/shop/index.php/index/search/keywords/<?php echo $v; ?>"><?php echo $v; ?></a>
		<?php endforeach; ?>
 </div>
<div class="menu_box clearfix"> 
<div class="block"> 
<div class="menu">
  <a href="/mbmeilishuo/index.php">首页<span></span></a>
		<?php if(is_array($navres)): $i = 0; $__LIST__ = $navres;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo['nav_pos'] == 2): ?><a href="<?php echo ($vo["nav_url"]); ?>" class="cur" <?php if($vo['nav_blank'] == 1): ?>target="_blank"<?php endif; ?> >
						<?php echo ($vo["nav_name"]); ?> <span></span>
				</a><?php endif; endforeach; endif; else: echo "" ;endif; ?>

 
 </div> 
</div>
</div>
 
 

<?php dump($goodsInfo)?>;




  <div class="block box">
<div class="blank"></div>
 <div id="ur_here">
当前位置: <a href=".">首页</a> <code>&gt;</code> 购物流程 
</div>
</div>
<div class="blank"></div>
 
<div class="block table">
  
  
  
  <script type="text/javascript" src="./style/showdiv.js"></script>  <script type="text/javascript">
      var user_name_empty = "请输入您的用户名！";
      var email_address_empty = "请输入您的电子邮件地址！";
      var email_address_error = "您输入的电子邮件地址格式不正确！";
      var new_password_empty = "请输入您的新密码！";
      var confirm_password_empty = "请输入您的确认密码！";
      var both_password_error = "您两次输入的密码不一致！";
      var show_div_text = "请点击更新购物车按钮";
      var show_div_exit = "关闭";
    </script>
  <div class="flowBox">
    <h6><span>商品列表</span></h6>
        <form id="formCart" name="formCart" method="post" action="flow.php">
           <table id="cart1" width="99%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
            <tr>
              <th bgcolor="#ffffff">商品名称</th>
                    <th bgcolor="#ffffff">属性</th>
                                          <th bgcolor="#ffffff">市场价</th>
                            <th bgcolor="#ffffff">本店价</th>
              <th bgcolor="#ffffff">购买数量</th>
              <th bgcolor="#ffffff">小计</th>
              <th bgcolor="#ffffff">操作</th>
            </tr>
                        <?php  $tprice=0; $tmprice=0; foreach($goodsInfo as $k=>$v):?>
           <tr goods_id="<?php echo $v['goods_id'];?>" goods_attr_ids="<?php echo $v['goods_attr_ids']; ?>" >
              <td bgcolor="#ffffff" align="center" style="width:300px;">
                             <a href="goods.php?id=2" target="_blank"><img style="width:80px; height:80px;" src="/shop/<?php echo ($v['midThumb']); ?>" border="0" title="华为手机" /></a><br />
							<a href="goods.php?id=2" target="_blank" class="f6"><?php echo ($v['goodsname']); ?></a>
                 </td>
				<td align="left" bgcolor="#ffffff">
                            <?php echo $v['attrStr']?>
                </td>
                <td align="center" bgcolor="#ffffff" mkprice="<?php echo $v['marketPrice'];?>" ><?php $tmprice+=($v['marketPrice']*$v['number']); echo $v['marketPrice'];?></td>
                <td align="center" bgcolor="#ffffff" mprice="<?php echo $v['mprice'] ;?>"><?php echo $v['mprice'] ;?></td>
				<td align="center" bgcolor="#ffffff">
								<span onclick="delnum(this)" style="border:1px solid #ccc; padding:2px 5px; cursor:pointer; " >-</span>
                                <input type="text" name="goods_number[3]" id="goods_number_3" value="<?php echo $v['number'];?>" size="4" class="inputBg" style="text-align:center " onkeydown="showdiv(this)"/>
								<span  onclick="addnum(this)" style="border:1px solid #ccc; padding:2px 5px; cursor:pointer; " >+</span>
				</td>
              <td align="center" bgcolor="#ffffff" xjje="<?php $xj=$v['mprice']*$v['number']; echo $xj?>">￥<?php  $xj=$v['mprice']*$v['number']; $tprice+=$xj; echo $xj; ?>元</td>
              <td align="center" bgcolor="#ffffff">
					<a href="#" onclick="deltr(this);" class="f6">删除</a>
              </td>
            </tr>
			<?php endforeach;?>
			
                      </table>
          <table width="99%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
            <tr>
              <td bgcolor="#ffffff">
                            购物金额小计 ￥<span id="xjje"><?php echo $tprice; ?></span>元，比市场价 ￥<span id="scje"><?php echo $tmprice; ?></span>元 节省了 ￥<span id="jsje"><?php $total =$tmprice-$tprice;echo $total; ?></span>元 </td>
              <td align="right" bgcolor="#ffffff">
                <input type="button" value="清空购物车" class="bnt_blue_1" onclick="deltb();" />
              </td>
            </tr>
          </table>
          <input type="hidden" name="step" value="update_cart" />
		  <table width="99%" align="center" border="0" cellpadding="5" cellspacing="0" bgcolor="#dddddd">
          <tr>
            <td bgcolor="#ffffff"><a href="/shop/index.php" target="_blank"><img src="/shop/Public/images//continue.gif" alt="continue" /></a></td>
            <td bgcolor="#ffffff" align="right"><a id ="jszx" href="/shop/index.php/Home/Flow/flow2"><img src="/shop/Public/images/checkout.gif" alt="checkout" /></a></td>
          </tr>
        </table>
        </form>
			<script>
				function delnum(o){
					var input = $(o).next();
					var num=input.val();
					var xjje=$("#xjje").html();
					var scje=$("#scje").html();
					var jsje=$("#jsje").html();
					var gi=$(o).parent().parent().attr('goods_id');//获取商品的id
					var gattr=$(o).parent().parent().attr('goods_attr_ids');//获取商品的属性id
					if(num>1){
						num=parseInt(num)-1;
						//ajax 获取当前商品库存量
						getgoodsnum(gi,gattr,num);
						input.val(num);
						var mprice=$(o).parent().prev().attr('mprice');
						var xj=mprice*num;
						xj="￥"+xj+"元";
						$(o).parent().next().html(xj);
						var mkprice=$(o).parent().prev().prev().attr('mkprice');
						xjje=parseInt(xjje)-parseInt(mprice);
						$("#xjje").html(xjje);
						scje = parseInt(scje)-parseInt(mkprice);
						$("#scje").html(scje);
						jsje=parseInt(scje)-parseInt(xjje);
						$("#jsje").html(jsje);
					}else{
						alert('数量不能少于1');
						return false;
					}
					ajaxupdategn(gi,gattr,num)
				}
				
				function addnum(o){
					var input =$(o).prev();
					var num=input.val();
					var xjje=$("#xjje").html();
					var scje=$("#scje").html();
					var jsje=$("#jsje").html();
					var gi=$(o).parent().parent().attr('goods_id');//获取商品的id
					var gattr=$(o).parent().parent().attr('goods_attr_ids');//获取商品的属性id
					num=parseInt(num)+1;
					//ajax 获取当前商品库存量
					getgoodsnum(gi,gattr,num);
					input.val(num);
					var mprice=$(o).parent().prev().attr('mprice');
					var mkprice=$(o).parent().prev().prev().attr('mkprice');
					xjje=parseInt(xjje)+parseInt(mprice);
					$("#xjje").html(xjje);
					scje = parseInt(scje)+parseInt(mkprice);
					$("#scje").html(scje);
					jsje=parseInt(scje)-parseInt(xjje);
					$("#jsje").html(jsje);
					var xj=mprice*num;
					xj="￥"+xj+"元";
					$(o).parent().next().html(xj);
					ajaxupdategn(gi,gattr,num)
				}
				
				function deltr(o){
					var h=$(o).html();
					if(!confirm("你确定要删除这个商品吗？")){
						return false;
					}
					var input=$(o).parent().prev().prev().find('input');//获取本栏商品数量的元素
					var  num=input.val();//获取本栏本商品的数量
					var mprice=$(o).parent().prev().prev().prev().attr("mprice");//获取本栏的商品本店价
					var mkprice=$(o).parent().prev().prev().prev().prev().attr("mkprice");//获取本栏的市场价
					var sxjje=parseInt(mprice)*parseInt(num);		//本商品栏总的本店价
					var tmkprice=parseInt(mkprice)*parseInt(num);  //本商品栏总的市场价
					var xjje=$("#xjje").html();//获得表格下原来总的小计价格元素值
					var scje=$("#scje").html();//获得表格下原来总的市场价格元素值
					var jsje=$("#jsje").html();//获得表格下原来总的节省金额值
					delxjje=parseInt(xjje)-sxjje;//获得删除本商品后总的本店价格
					var delmkprice=parseInt(scje)-tmkprice;//获得删除本商品后总的市场价格
					var deljsje=delmkprice-delxjje;//获得删除本商品后总的节省价格
					var gi=$(o).parent().parent().attr('goods_id');//获取商品的id
					var gattr=$(o).parent().parent().attr('goods_attr_ids');//获取商品的属性id
					$("#xjje").html(delxjje);
					$("#scje").html(delmkprice);
					$("#jsje").html(deljsje);
					$(o).parent().parent().remove();
					ajaxupdategn(gi,gattr)
				}
				
				function ajaxupdategn(gi,gattr,num){
					if(gattr==""){
							$.get("/shop/index.php/Home/Flow/ajaxupdategoodsGN/gi/"+gi+"/num/"+num);
					}else{
							$.get("/shop/index.php/Home/Flow/ajaxupdategoodsGN/gi/"+gi+"/gattr/"+gattr+"/num/"+num);
					}
				
				}
				
				
				function deltb(){
				$("#cart1").html("暂无商品数据");
				$("#xjje").text(0);
				$("#scje").text(0);
				$("#jsje").text(0);
				cleCar();
				}
				
				function cleCar(){
					$.get("/shop/index.php/Home/Flow/clearCart");
				}
				
				
				  
			   //ajax获取商品的库存数量
			   
					function getgoodsnum(gid,gaid,num){
					
						if(gaid !=''){
							 var url = "/shop/index.php/Home/goods/getgoodsnum/gid/"+gid+"/gaid/"+gaid;
							 
							}else{
								var url = "/shop/index.php/Home/goods/getgoodsnum/gid/"+gid;
							}
						$.ajax({
							type:"get",
							url:url,
							success:function(data){
								if(data<num){
									alert("当前商品库存不足！");
									$("#jszx").attr("href","javascript:;");
								}else{
									$("#jszx").attr("href","/shop/index.php/Home/Flow/flow2");
								}
							}
						});
					}
					
					
			//	getgoodsnum(goods_id,goods_attr_ids,num);
				
			</script>
			
		
        

  </div>
    <div class="blank"></div>
   
    <div class="blank5"></div>
  
</div>

 <div class="footer">
  <div class="foot_con">
    <div class="f_list service_info">
      <div class="kefu"> <span class="tel_ico"></span>
        <p class="f20_f">4000-021-758</p>
        <p class="f14_f mt4_f">客服热线</p>
      </div>
      <ol class="business">
        <li>周一至周日：09:00-22:00</li>
      </ol>
    </div>
     <!--循环输出页底的文章列表1-->
     <?php if(is_array($hcres)): $i = 0; $__LIST__ = $hcres;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="f_list">
				  <h4><?php echo ($vo["cate_name"]); ?></h4>
				  <ul>
						<?php if(is_array($vo['article'])): $i = 0; $__LIST__ = $vo['article'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo2): $mod = ($i % 2 );++$i;?><li><a target="_blank" href="/mbmeilishuo/article.php?id=9" title="售后流程"><?php echo ($vo2["title"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
					</ul>
			</div><?php endforeach; endif; else: echo "" ;endif; ?>

      <div class="f_list">
		  <h4>关注我们</h4>
		  <ul>
			<li class="sina_attention"> <a href="http://weibo.com/ECMBT/home?topnav=1&amp;wvr=5" target="_blank"><span class="i_sina">&nbsp;</span>新浪微博</a></li>
			<li><a href="#" target="_blank"><span class="i_qzone">&nbsp;</span>QQ空间</a></li>
			<li><a href="#" target="_blank"><span class="i_tx">&nbsp;</span>腾讯微博</a></li>
		  </ul>
    </div>
    <div class="f_list qr-code">
      <h4>微信服务号</h4>
      <img src="/shop/Public/images/weixinfuwuhao.png" alt="模板堂服务号二维码"> </div>
    <div class="f_list weixin_code">
      <h4>客户端下载</h4>
      <a class="client_pic" href="http://www.ecmoban.com/topic/ecmoban_app/" target="_blank"></a> </div>
    <div class="blank"></div>
     
       
       
      <div class="blank"></div>
    
    <div id="bottomNav" class="rolling">
    <h4 class="f_links">底部导航：</h4>
      <ul id="link_slide">
      <li>
             <?php if(is_array($navres)): $i = 0; $__LIST__ = $navres;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo['nav_pos'] == 3): ?><a href="<?php echo ($vo["nav_url"]); ?>" <?php if($vo['nav_blank'] == 1): ?>target="_blank"<?php endif; ?>><?php echo ($vo["nav_name"]); ?></a><?php endif; endforeach; endif; else: echo "" ;endif; ?>
          </li>
          </ul>
    </div>
    
    
    
    
    <div class="text" style="height:1px ; width:1px; overflow:hidden;">  
       
      Tel: 123456 
       
       
       
       
      <a href="http://wpa.qq.com/msgrd?V=1&amp;Uin=851818184&amp;Site=%E9%BC%8E%E6%96%B0%E6%96%87%E5%8C%96QQ851818184&amp;Menu=yes" target="_blank"><img src="/shop/Public/images/pa.gif" alt="QQ" border="0" height="16"> 851818184</a> 
       
       
       
       
       
       
       
       
       
       
      <img src="/shop/Public/images/msn.gif" alt="MSN" border="0" height="17" width="18"> <a href="msnim:chat?contact=ecmoban@msn.com">ecmoban@msn.com</a> 
       
       
       
       
      <br>
    </div>
    <div class="record"> ? 测试购物网站111111111。  &nbsp; <a href="#" target="_blank">电信与信息服务业务经营许可证100798号</a>&nbsp; <a href="#" target="_blank">企业法人营业执照</a>&nbsp; <?php echo ($configres["beian"]); ?>&nbsp; 京公网安备110108006045&nbsp;<br>
      客服邮箱：kf@mobantang.com&nbsp;&nbsp;客服电话：4000-021-758&nbsp; 文明办网文明上网举报电话：010-0000000 &nbsp; <a href="#" target="_blank">违法不良信息举报中心</a> </div>
  </div>
  <div class="blank10"></div>
  <div align="center"><a href="http://www.ecmoban.com/" target="_blank"><img src="/shop/Public/images/ecmoban.gif" alt="ECShop模板"></a></div>
</div>
<script type="text/javascript" src="/shop/Public/style/login.js"></script>

<div class="blank"></div>

<link href="/shop/Public/style/qq.css" rel="stylesheet" type="text/css" />
<div class="QQbox" id="divQQbox" style="width: 170px; ">
<div class="Qlist" id="divOnline" onmouseout="hideMsgBox(event);" style="display: none; " onmouseover="OnlineOver();">
    <div class="t"></div>
    <div class="infobox">我们营业的时间<br>9:00-18:00</div>
    <div class="con">

    </div>
    <div class="b"></div>
</div>
<div id="divMenu" onmouseover="OnlineOver();" style="display: block; "><img src="/shop/Public/images/qq_1.gif" class="press" alt="在线咨询"></div>
</div>


 
</body>

</html>